﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessModel;
using EntityDataModel;
using System.ComponentModel;
using Controller.DataProvider;
using System.Data;
//////////////////////////////////
using BaseUtilities;
using ManageStore.IViews;
using System.Collections.ObjectModel;
using BusinessModel.Reports;

namespace Controller
{
    public class ReportCtr
    {
        public ReportCtr()
        {
        }

        #region Properties
        private int myVar;

        public int MyProperty
        {
            get { return myVar; }
            set { myVar = value; }
        }
        

        // ReportPro.
        private ReportPro _ReportPro;
        public ReportPro ReportPro
        {
            get
            {
                if (_ReportPro == null)
                {
                    _ReportPro = new ReportPro();
                }
                return _ReportPro;
            }
            set { _ReportPro = value; }
        }

        //// ProductBusinessRpt.
        //private List<ProductBusinessRpt> _ProductBusinessRpt;
        //public List<ProductBusinessRpt> ProductBusinessRpt
        //{
        //    get
        //    {
        //        if (_ProductBusinessRpt == null)
        //        {
        //            _ProductBusinessRpt = new List<ProductBusinessRpt>();
        //        }
        //        return _ProductBusinessRpt;
        //    }
        //    set { _ProductBusinessRpt = value; }
        //}

        #endregion Properties

        #region Public Methods
        //----------------------------------------
        public ResultModel ProductInStock()
        {
            return ReportPro.GetsProductInStock();
        }
        //----------------------------------------
        public ResultModel ProductInStock(int pIndex, int pSize)
        {
            return ReportPro.GetsProductInStock(pIndex, pSize);
        }
        //----------------------------------------
        public ResultModel ProductInStockBuy()
        {
            return ReportPro.GetsProductInStockBuy();
        }
        //----------------------------------------
        public ResultModel ProductInStockSale()
        {
            return ReportPro.GetsProductInStockSale();
        }
        //----------------------------------------
        public ResultModel ProductCount()
        {
            return ReportPro.GetProductCount();
        }
        //----------------------------------------
        public ResultModel ProductSaleCount()
        {
            return ReportPro.GetProductSaleCount();
        }
        #endregion Public Methods
    }
}
